#ifndef _MUSIC_H
#define _MUSIC_H

#include <stddef.h>
#include <stdint.h>

typedef struct MusicNode {
  int number;
  char name[64];
  char info[255];
  char singer[128];
} MusicNode;

typedef struct {
  MusicNode *data;
  size_t len;
  size_t cap;
} musicvec_t;

typedef struct {
  char device_id[63];
  char device_name[63];
  musicvec_t musicvec;
} musictask_t;

void create_musicvec(musicvec_t *vecptr, size_t cap);
void delete_musicvec(musicvec_t *vecptr);
void musicvec_push_back(musicvec_t *v, MusicNode const *musicptr);
void create_musictask(musictask_t *taskptr, size_t music_num);
void delete_musictask(musictask_t *taskptr);
MusicNode *get_musicptr(musicvec_t *vecptr, size_t index);
void print_musictask(musictask_t *taskptr);

#endif
